home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagn_r.zip / PARSING.SWG / 0004_Check for CmdLine switch.pas < prev    next >
Pascal/Delphi Source File  |  1993-09-26  |  713b  |  15 lines

  1. {*****************************************************************************
  2.  * Function ...... IsSwitch()
  3.  * Purpose ....... To test for the presence of a switch on the command line
  4.  * Parameters .... sSwitch     Switch to scan the command line for
  5.  * Returns ....... .T. if the switch was found
  6.  * Notes ......... Uses functions Command and UpperCase
  7.  * Author ........ Martin Richardson
  8.  * Date .......... September 28, 1992
  9.  *****************************************************************************}
  10. FUNCTION IsSwitch( sSwitch: STRING ): BOOLEAN;
  11. BEGIN
  12.      IsSwitch := (POS( '/'+sSwitch, UpperCase(Command) ) <> 0) OR
  13.                  (POS( '-'+sSwitch, UpperCase(Command) ) <> 0);
  14. END;
  15.